package src.javaStudy.Collection.ArrayList;

/**
 * @program: AlgorithmTest
 * @description:
 * @author: powerWriter
 * @create: 2019-07-05 21:18
 **/
public class ArrayListDemo {
    public static void main(String[] args){
        ArrayListByWriter arrayListByWriter = new ArrayListByWriter();
        ArrayListByWriter arrayListByWriter2 = new ArrayListByWriter(25);

        arrayListByWriter.add("writer");
        arrayListByWriter.add("tom");
        arrayListByWriter.add("power");
        arrayListByWriter.add("char");
        arrayListByWriter.add("string");

        arrayListByWriter2.add(123.3);
        arrayListByWriter2.add(453);
        arrayListByWriter2.add(823);
        arrayListByWriter2.add(193);
        arrayListByWriter2.add(473);
        arrayListByWriter2.add(56.3);

        System.out.println("arrayListByWriter数组长度："+arrayListByWriter.getListSize());
        System.out.println("arrayListByWriter2数组长度："+arrayListByWriter2.getListSize());

        System.out.println("arrayListByWriter数据长度："+arrayListByWriter.getSize());
        System.out.println("arrayListByWriter2数据长度："+arrayListByWriter2.getSize());

        arrayListByWriter.insert(1, "iron man");
        arrayListByWriter2.insert(0, 100.00);

        arrayListByWriter.showData("array1数据：");
        System.out.println();
        arrayListByWriter2.showData("array2数据：");

    }
}
